package com.ice.api.system.feign;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.ice.api.system.fallback.UserServiceFallback;
import com.iceframework.core.support.security.entity.PermissionInfo;

/**
 * 
 * @author Palo
 *
 */
@FeignClient(value = "authority-service", fallback = UserServiceFallback.class)
public interface IUserService {
	@RequestMapping(value = "/sys/user/{username}/permissions", method = RequestMethod.GET)
	public List<PermissionInfo> getPermissionByUsername(@PathVariable("username") String username);

	@RequestMapping(value = "/sys/user/permissions", method = RequestMethod.GET)
	List<PermissionInfo> getAllPermissionInfo();
	
	@RequestMapping(value = "/user/resource/{username}/permissions", method = RequestMethod.GET)
	public List<String> getPermissionResourceByUsername(@PathVariable("username") String username) ;
}
